package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.CardRefEntity;
import com.dragon.modules.yuegou.enums.member.CardRefCardType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员卡关联表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-11-04 14:36:27
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class CardRefQuery extends CardRefEntity implements Query<CardRefEntity> {

    /** 主键查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 支付宝会员卡模板ID查询条件 */
	@JsonUnwrapped(prefix = "templateId")
	private Condition<String> templateIdCondition;

    /** 支付宝用户id查询条件 */
	@JsonUnwrapped(prefix = "aliUserid")
	private Condition<String> aliUseridCondition;

    /** 支付宝会员卡id查询条件 */
	@JsonUnwrapped(prefix = "cardId")
	private Condition<String> cardIdCondition;

    /** 商家会员卡编号查询条件 */
	@JsonUnwrapped(prefix = "cardNo")
	private Condition<String> cardNoCondition;

    /** [枚举]类型：1-支付宝-ALI查询条件 */
	@JsonUnwrapped(prefix = "cardType")
	private Condition<CardRefCardType> cardTypeCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 修改时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public CardRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public CardRefQuery(CardRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public CardRefQuery(CardRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.templateIdCondition != null) {
			this.templateIdCondition = other.templateIdCondition.copy();
		}
		if(other.aliUseridCondition != null) {
			this.aliUseridCondition = other.aliUseridCondition.copy();
		}
		if(other.cardIdCondition != null) {
			this.cardIdCondition = other.cardIdCondition.copy();
		}
		if(other.cardNoCondition != null) {
			this.cardNoCondition = other.cardNoCondition.copy();
		}
		if(other.cardTypeCondition != null) {
			this.cardTypeCondition = other.cardTypeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
	}

	@Override
	public QueryWrapper<CardRefEntity> toQueryWrapper() {
		QueryWrapper<CardRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (templateIdCondition != null) {
			templateIdCondition.toWrapper(wrapper, COL_TEMPLATE_ID);
		}
		if (aliUseridCondition != null) {
			aliUseridCondition.toWrapper(wrapper, COL_ALI_USERID);
		}
		if (cardIdCondition != null) {
			cardIdCondition.toWrapper(wrapper, COL_CARD_ID);
		}
		if (cardNoCondition != null) {
			cardNoCondition.toWrapper(wrapper, COL_CARD_NO);
		}
		if (cardTypeCondition != null) {
			cardTypeCondition.toWrapper(wrapper, COL_CARD_TYPE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		return wrapper;
	}

	/**
	 * 构造并返回主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取主键查询条件
	 * 
	 * @return idCondition 主键查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置主键查询条件
	 * 
	 * @param idCondition 主键查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回支付宝会员卡模板ID查询条件
	 * 
	 * @return templateIdCondition 支付宝会员卡模板ID查询条件
	 */
	public Condition<String> templateId() {
		this.templateIdCondition = new Condition<>();
		return this.templateIdCondition;
	}
	
	/**
	 * 获取支付宝会员卡模板ID查询条件
	 * 
	 * @return templateIdCondition 支付宝会员卡模板ID查询条件
	 */
	public Condition<String> getTemplateIdCondition() {
		return templateIdCondition;
	}

	/**
	 * 设置支付宝会员卡模板ID查询条件
	 * 
	 * @param templateIdCondition 支付宝会员卡模板ID查询条件
	 */
	public void setTemplateIdCondition(Condition<String> templateIdCondition) {
		this.templateIdCondition = templateIdCondition;
	}

	/**
	 * 构造并返回支付宝用户id查询条件
	 * 
	 * @return aliUseridCondition 支付宝用户id查询条件
	 */
	public Condition<String> aliUserid() {
		this.aliUseridCondition = new Condition<>();
		return this.aliUseridCondition;
	}
	
	/**
	 * 获取支付宝用户id查询条件
	 * 
	 * @return aliUseridCondition 支付宝用户id查询条件
	 */
	public Condition<String> getAliUseridCondition() {
		return aliUseridCondition;
	}

	/**
	 * 设置支付宝用户id查询条件
	 * 
	 * @param aliUseridCondition 支付宝用户id查询条件
	 */
	public void setAliUseridCondition(Condition<String> aliUseridCondition) {
		this.aliUseridCondition = aliUseridCondition;
	}

	/**
	 * 构造并返回支付宝会员卡id查询条件
	 * 
	 * @return cardIdCondition 支付宝会员卡id查询条件
	 */
	public Condition<String> cardId() {
		this.cardIdCondition = new Condition<>();
		return this.cardIdCondition;
	}
	
	/**
	 * 获取支付宝会员卡id查询条件
	 * 
	 * @return cardIdCondition 支付宝会员卡id查询条件
	 */
	public Condition<String> getCardIdCondition() {
		return cardIdCondition;
	}

	/**
	 * 设置支付宝会员卡id查询条件
	 * 
	 * @param cardIdCondition 支付宝会员卡id查询条件
	 */
	public void setCardIdCondition(Condition<String> cardIdCondition) {
		this.cardIdCondition = cardIdCondition;
	}

	/**
	 * 构造并返回商家会员卡编号查询条件
	 * 
	 * @return cardNoCondition 商家会员卡编号查询条件
	 */
	public Condition<String> cardNo() {
		this.cardNoCondition = new Condition<>();
		return this.cardNoCondition;
	}
	
	/**
	 * 获取商家会员卡编号查询条件
	 * 
	 * @return cardNoCondition 商家会员卡编号查询条件
	 */
	public Condition<String> getCardNoCondition() {
		return cardNoCondition;
	}

	/**
	 * 设置商家会员卡编号查询条件
	 * 
	 * @param cardNoCondition 商家会员卡编号查询条件
	 */
	public void setCardNoCondition(Condition<String> cardNoCondition) {
		this.cardNoCondition = cardNoCondition;
	}

	/**
	 * 构造并返回[枚举]类型：1-支付宝-ALI查询条件
	 * 
	 * @return cardTypeCondition [枚举]类型：1-支付宝-ALI查询条件
	 */
	public Condition<CardRefCardType> cardType() {
		this.cardTypeCondition = new Condition<>();
		return this.cardTypeCondition;
	}
	
	/**
	 * 获取[枚举]类型：1-支付宝-ALI查询条件
	 * 
	 * @return cardTypeCondition [枚举]类型：1-支付宝-ALI查询条件
	 */
	public Condition<CardRefCardType> getCardTypeCondition() {
		return cardTypeCondition;
	}

	/**
	 * 设置[枚举]类型：1-支付宝-ALI查询条件
	 * 
	 * @param cardTypeCondition [枚举]类型：1-支付宝-ALI查询条件
	 */
	public void setCardTypeCondition(Condition<CardRefCardType> cardTypeCondition) {
		this.cardTypeCondition = cardTypeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取修改时间查询条件
	 * 
	 * @return modifiedTimeCondition 修改时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置修改时间查询条件
	 * 
	 * @param modifiedTimeCondition 修改时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

}
